package base_02_clone;

/**
 * 引用拷贝
 *
 * @author <a href="mailto:sjj@jianzhimao.com">mojo</a>
 * copyright (C), 2013-2022, 广州九尾信息科技有限公司
 * @date 2022/2/8 18:06
 */
public class ReferenceCopyDemo {
    public static void main(String[] args) {
        User person = new User("mojo", 11);
        //直接赋值，传递引用,引用拷贝
        User u1 = person;
        person.setName("tom");
        System.out.println(person);
        System.out.println(u1);
    }
}
